import { IUser } from "@/api/service/user/types";

interface UserData {
  roleIds: string[];
  roles: any[];
  user: IUser | undefined;
}
export const userData = ref<UserData>({
  roleIds: [],
  roles: [],
  user: undefined
});
export const showForm = ref(false);

export const userObj = {
  userName: "",
  nickName: "",
  telephone: "",
  roles: [],
  roleIds: [],
  deptId: "",
  storeName: "",
  storeNo: "",
  platform: ""
};
export const userForm = ref<IUser>({
  ...userObj,
  storeName: ""
});
export const resetForm = () => {
  userForm.value = {
    ...userObj
  };
};
